﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using log4net;

namespace UFC.Common
{
    public class LogHelp
    {
        public static ILog loginfo = log4net.LogManager.GetLogger("loginfo");
        public static ILog logerror = log4net.LogManager.GetLogger("logerror");
        private static ILog myLog = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);

        public static void SetConfig()
        {
            log4net.Config.XmlConfigurator.Configure();
        }

        public static void WriteLog(string strInfo)
        {
            loginfo.Info(strInfo);
        }

        public static void WriteError(string strInfo, Exception e)
        {
            logerror.Error(strInfo, e);
        }

    }
}
